The thing is when I select an item from the drop-down list the other html disappears (even the doctype, and drop down list), and it just displays the values... This is all happening on the same page (test.html), so I'm not sure what is going on. Would using "document.write" in the script mess it up so it only display the output from the function? Any help is appreciated, thanks.
Expand|Select|Wrap|Line Numbers
- <doctype etc...>
- <html>
- <head>
- <script type="text/javascript">
- function initMenu(value) {
- .. code to parse xml file and print out values
- }
- </script>
- </head>
- <body>
- <form name="myForm">
- <select name="mySelect" onchange="initMenu(this.value)">
- <option value="Item1">Item 1</option>
- <option value="Item2">Item 2</option>
- <option value="Item3">Item 3</option>
- <option value="Item4">Item 4</option>
- </select>
- </form>
- </body>
- </html>